Skip to content

Make API rate limit reflect reality around rate limit window borders#6497

Open
apata wants to merge 1 commit into
masterfrom
fix-rate-limit-flaky-test
Open

Make API rate limit reflect reality around rate limit window borders#6497
apata wants to merge 1 commit into
masterfrom
fix-rate-limit-flaky-test

Conversation

@apata

@apata apata commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Changes

The test fail reveals that the max burst is double the burst limit when the burst falls in the last second of the Nth window and first second of the N+1th window. Same for hourly limit.

This is a known issue with fixed window rate limiting.

This fixes the test assert for now to reflect reality, but in the future, we may want to consider another counter strategy, like gradually refilling.

@apata apata requested a review from a team July 9, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant